package com.hsu.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author Hsu琛君珩
 * @Date 2025-03-18 18:02
 * @Description
 * @Version: v1.0.0
 */
@AllArgsConstructor
@Getter
public enum ResultCode {

    SUCCESS(1000, "操作成功"),

    ERROR(2000, "服务器繁忙请稍后重试"),

    FAILED(3000, "操作失败"),
    FAILED_UNAUTHORIZED(3001, "未授权"),
    FAILED_PARAMS_VALIDATE(3002, "参数校验失败"),
    FAILED_NOT_EXISTS(3003, "资源不存在"),
    FAILED_ALREADY_EXISTS(3004, "资源已存在"),

    FAILED_USER_EXISTS(3101, "用户已存在"),
    FAILED_USER_NOT_EXISTS(3102, "用户不存在"),
    FAILED_LOGIN(3103, "用户名或密码错误"),
    FAILED_USER_BANDED(3104, "您已被列入黑名单，请联系管理员"),
    FAILED_USER_PHONE(3105, "您输入的手机号有误"),
    FAILED_FREQUENT(3106, "操作频繁，请稍后重试"),
    FAILED_TIME_LIMIT(3107, "当天请求次数已达到上限"),
    FAILED_SEND_CODE(3108, "验证码发送错误"),
    FAILED_INVALID_CODE(3109, "验证码无效"),
    FAILED_ERROR_CODE(3110, "验证码错误"),

    EXAM_START_TIME_BEFORE_CURRENT_TIME(3201, "竞赛开始时间不能早于当前时间"),
    EXAM_START_TIME_AFTER_EXAM_END_TIME(3202, "竞赛结束时间不能晚于竞赛开始时间"),
    EXAM_NOT_EXISTS(3203, "竞赛不存在"),
    EXAM_QUESTION_NOT_EXISTS(3204, "为竞赛新增的题目不存在"),
    EXAM_STARTED(3205, "竞赛已经开始，无法进行操作"),
    EXAM_NOT_HAS_QUESTION(3206, "竞赛中不包含题目，无法发布竞赛"),
    EXAM_IS_FINISH(3207, "竞赛已经结束，不能进行操作"),
    ;

    private int code;
    private String msg;

}
